#pragma once
#include <iostream>
#include <stdbool.h>
using namespace std;

class Data
{
public:

	inline int GetDay(const Data& d)
	{
		static int arr[13] = { -1,31,28,31,30,31,30,31,31,30,31,30,31 };
		if (d._year == 2 && (d._year % 4 == 0 && d._year % 100 != 0) || d._year % 400 == 0)
		{
			return 29;
		}
		else
		{
			return arr[d._month];
		}
	}

	Data(int year, int month, int day);
	bool operator>=(const Data& d);
	bool operator==(const Data& d);
	bool operator<=(const Data& d);
	bool operator!=(const Data& d);
	Data operator+(int x);
	void Print();
	~Data();
private:
	int _year;
	int _month;
	int _day;
};